<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class nhtzs extends MY_Controller {
    /* 来自父类
     * public $ceeconfigArray;//cee配置
     * public $userinfoArray; //用户信息
     * public $isloginArray; // 用户是否登录
     */
    //析构
    function __construct(){
        parent::__construct();
        //加载数据库
        $this->load->model('Nhtzs_model','_model');
    }
    //精选
	public function index(){
	    //商品信息
	    $goodsArray = $this->_model->getGoodsArray();//数组，不止有0：商品，还有1：日期
	    //视图中的参数
	    $data = array('appid' => $this->ceeconfigArray['appid'],
	                    'pf'  => $this->session->userdata('pf')?$this->session->userdata('pf'):"qzone",
	                    'userinfo' => $this->userinfoArray,
	                    'goodsArray' => $goodsArray[0],
	                    'goodsArrayFromDate' => $goodsArray[1],
	                    'controller' => 'nhtzs',
	    );
	    $this->load->view('common/header',$data);
		$this->load->view('nhtzs');//加载视图view
		$this->load->view('common/footer');
	}
	/* //商品点击
	public function AjaxGoodsClick(){
		if (empty($_GET['id'])) {
			echo json_encode(array('ret'=>-1));//错误
			return false;
		}
		$rs = $this->_model->AjaxGoodsClick($_GET['id']);
		echo $rs;
		return false;
	} */
	//
	public function test(){
		//var_dump($this->ceeclass->islogin());
	}
}